package edu.neu.swc.cloud.domain;

import java.util.ArrayList;
import java.util.List;

public class Equipment {
    private int eq_id;
    private String eq_code;
    private String eq_name;
    private String eq_spec;
    private int eq_rent;//租用状态，1时为租用，0时为未租用，默认未0
    private int eq_state;//设备状态，0未停止，1为开始
    private int eq_fac_id;//所属工厂编号,为0时表示它不属于任何工厂
    private String eq_cata;//设备种类

    //编辑所配置的产品
    List<Product> on_pro;//可以为空

    /**
     * 重写无参构造，默认为未租用，关停状态
     */
    public Equipment() {
        this.eq_state = 0;
        this.eq_rent = 0;
        this.on_pro = new ArrayList<Product>();
    }

    public int getEq_id() {
        return eq_id;
    }

    public void setEq_id(int eq_id) {
        this.eq_id = eq_id;
    }

    public String getEq_code() {
        return eq_code;
    }

    public void setEq_code(String eq_code) {
        this.eq_code = eq_code;
    }

    public String getEq_name() {
        return eq_name;
    }

    public void setEq_name(String eq_name) {
        this.eq_name = eq_name;
    }

    public String getEq_spec() {
        return eq_spec;
    }

    public void setEq_spec(String eq_spec) {
        this.eq_spec = eq_spec;
    }

    public int getEq_rent() {
        return eq_rent;
    }

    public void setEq_rent(int eq_rent) {
        this.eq_rent = eq_rent;
    }

    public int getEq_state() {
        return eq_state;
    }

    public void setEq_state(int eq_state) {
        this.eq_state = eq_state;
    }

    public int getEq_fac_id() {
        return eq_fac_id;
    }

    public void setEq_fac_id(int eq_fac_id) {
        this.eq_fac_id = eq_fac_id;
    }

    public String getEq_cata() {
        return eq_cata;
    }

    public void setEq_cata(String eq_cata) {
        this.eq_cata = eq_cata;
    }

    public List<Product> getOn_pro() {
        return on_pro;
    }

    public void setOn_pro(List<Product> on_pro) {
        this.on_pro = on_pro;
    }

    @Override
    public String toString() {
        return "Equipment{" + "eq_id=" + eq_id + ", eq_code='" + eq_code + '\'' + ", eq_name='" + eq_name + '\'' + ", eq_spec='" + eq_spec + '\'' + ", eq_rent=" + eq_rent + ", eq_state=" + eq_state + ", eq_fac_id=" + eq_fac_id + ", eq_cata='" + eq_cata + '\'' + ", on_pro=" + on_pro + '}';
    }
}
